\(\int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx\) [10]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 106 \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=-\frac {\sqrt [4]{b} \log \left (\sqrt {a}-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {b} x^2\right )}{2 \sqrt {2} \sqrt [4]{a}}+\frac {\sqrt [4]{b} \log \left (\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {b} x^2\right )}{2 \sqrt {2} \sqrt [4]{a}} \]

[Out]

-1/4*b^(1/4)*ln(-a^(1/4)*b^(1/4)*x*2^(1/2)+a^(1/2)+x^2*b^(1/2))/a^(1/4)*2^(1/2)+1/4*b^(1/4)*ln(a^(1/4)*b^(1/4)
*x*2^(1/2)+a^(1/2)+x^2*b^(1/2))/a^(1/4)*2^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {1179, 642} \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=\frac {\sqrt [4]{b} \log \left (\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {a}+\sqrt {b} x^2\right )}{2 \sqrt {2} \sqrt [4]{a}}-\frac {\sqrt [4]{b} \log \left (-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {a}+\sqrt {b} x^2\right )}{2 \sqrt {2} \sqrt [4]{a}} \]

[In]

Int[(Sqrt[a]*Sqrt[b] - b*x^2)/(a + b*x^4),x]

[Out]

-1/2*(b^(1/4)*Log[Sqrt[a] - Sqrt[2]*a^(1/4)*b^(1/4)*x + Sqrt[b]*x^2])/(Sqrt[2]*a^(1/4)) + (b^(1/4)*Log[Sqrt[a]
 + Sqrt[2]*a^(1/4)*b^(1/4)*x + Sqrt[b]*x^2])/(2*Sqrt[2]*a^(1/4))

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1179

Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[-2*(d/e), 2]}, Dist[e/(2*c*q), Int[
(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x - x^2, x], x], x]] /
; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && NegQ[d*e]

Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt [4]{b} \int \frac {\frac {\sqrt {2} \sqrt [4]{a}}{\sqrt [4]{b}}+2 x}{-\frac {\sqrt {a}}{\sqrt {b}}-\frac {\sqrt {2} \sqrt [4]{a} x}{\sqrt [4]{b}}-x^2} \, dx}{2 \sqrt {2} \sqrt [4]{a}}-\frac {\sqrt [4]{b} \int \frac {\frac {\sqrt {2} \sqrt [4]{a}}{\sqrt [4]{b}}-2 x}{-\frac {\sqrt {a}}{\sqrt {b}}+\frac {\sqrt {2} \sqrt [4]{a} x}{\sqrt [4]{b}}-x^2} \, dx}{2 \sqrt {2} \sqrt [4]{a}} \\ & = -\frac {\sqrt [4]{b} \log \left (\sqrt {a}-\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {b} x^2\right )}{2 \sqrt {2} \sqrt [4]{a}}+\frac {\sqrt [4]{b} \log \left (\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {b} x^2\right )}{2 \sqrt {2} \sqrt [4]{a}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.86 \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=\frac {\sqrt [4]{b} \left (-\log \left (-\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x-\sqrt {b} x^2\right )+\log \left (\sqrt {a}+\sqrt {2} \sqrt [4]{a} \sqrt [4]{b} x+\sqrt {b} x^2\right )\right )}{2 \sqrt {2} \sqrt [4]{a}} \]

[In]

Integrate[(Sqrt[a]*Sqrt[b] - b*x^2)/(a + b*x^4),x]

[Out]

(b^(1/4)*(-Log[-Sqrt[a] + Sqrt[2]*a^(1/4)*b^(1/4)*x - Sqrt[b]*x^2] + Log[Sqrt[a] + Sqrt[2]*a^(1/4)*b^(1/4)*x +
 Sqrt[b]*x^2]))/(2*Sqrt[2]*a^(1/4))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(203\) vs. \(2(70)=140\).

Time = 0.24 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.92

method result size
default \(\frac {\sqrt {b}\, \left (\frac {a}{b}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {x^{2}+\left (\frac {a}{b}\right )^{\frac {1}{4}} x \sqrt {2}+\sqrt {\frac {a}{b}}}{x^{2}-\left (\frac {a}{b}\right )^{\frac {1}{4}} x \sqrt {2}+\sqrt {\frac {a}{b}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, x}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}+1\right )+2 \arctan \left (\frac {\sqrt {2}\, x}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}-1\right )\right )}{8 \sqrt {a}}-\frac {\sqrt {2}\, \left (\ln \left (\frac {x^{2}-\left (\frac {a}{b}\right )^{\frac {1}{4}} x \sqrt {2}+\sqrt {\frac {a}{b}}}{x^{2}+\left (\frac {a}{b}\right )^{\frac {1}{4}} x \sqrt {2}+\sqrt {\frac {a}{b}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, x}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}+1\right )+2 \arctan \left (\frac {\sqrt {2}\, x}{\left (\frac {a}{b}\right )^{\frac {1}{4}}}-1\right )\right )}{8 \left (\frac {a}{b}\right )^{\frac {1}{4}}}\) \(204\)

[In]

int((-b*x^2+a^(1/2)*b^(1/2))/(b*x^4+a),x,method=_RETURNVERBOSE)

[Out]

1/8/a^(1/2)*b^(1/2)*(a/b)^(1/4)*2^(1/2)*(ln((x^2+(a/b)^(1/4)*x*2^(1/2)+(a/b)^(1/2))/(x^2-(a/b)^(1/4)*x*2^(1/2)
+(a/b)^(1/2)))+2*arctan(2^(1/2)/(a/b)^(1/4)*x+1)+2*arctan(2^(1/2)/(a/b)^(1/4)*x-1))-1/8/(a/b)^(1/4)*2^(1/2)*(l
n((x^2-(a/b)^(1/4)*x*2^(1/2)+(a/b)^(1/2))/(x^2+(a/b)^(1/4)*x*2^(1/2)+(a/b)^(1/2)))+2*arctan(2^(1/2)/(a/b)^(1/4
)*x+1)+2*arctan(2^(1/2)/(a/b)^(1/4)*x-1))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.42 \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=\left [\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {\sqrt {b}}{\sqrt {a}}} \log \left (\frac {b x^{4} + 4 \, \sqrt {a} \sqrt {b} x^{2} + 4 \, \sqrt {\frac {1}{2}} {\left (\sqrt {a} \sqrt {b} x^{3} + a x\right )} \sqrt {\frac {\sqrt {b}}{\sqrt {a}}} + a}{b x^{4} + a}\right ), -\sqrt {\frac {1}{2}} \sqrt {-\frac {\sqrt {b}}{\sqrt {a}}} \arctan \left (\sqrt {\frac {1}{2}} x \sqrt {-\frac {\sqrt {b}}{\sqrt {a}}}\right ) + \sqrt {\frac {1}{2}} \sqrt {-\frac {\sqrt {b}}{\sqrt {a}}} \arctan \left (\frac {\sqrt {\frac {1}{2}} {\left (\sqrt {a} \sqrt {b} x^{3} - a x\right )} \sqrt {-\frac {\sqrt {b}}{\sqrt {a}}}}{a}\right )\right ] \]

[In]

integrate((-b*x^2+a^(1/2)*b^(1/2))/(b*x^4+a),x, algorithm="fricas")

[Out]

[1/2*sqrt(1/2)*sqrt(sqrt(b)/sqrt(a))*log((b*x^4 + 4*sqrt(a)*sqrt(b)*x^2 + 4*sqrt(1/2)*(sqrt(a)*sqrt(b)*x^3 + a
*x)*sqrt(sqrt(b)/sqrt(a)) + a)/(b*x^4 + a)), -sqrt(1/2)*sqrt(-sqrt(b)/sqrt(a))*arctan(sqrt(1/2)*x*sqrt(-sqrt(b
)/sqrt(a))) + sqrt(1/2)*sqrt(-sqrt(b)/sqrt(a))*arctan(sqrt(1/2)*(sqrt(a)*sqrt(b)*x^3 - a*x)*sqrt(-sqrt(b)/sqrt
(a))/a)]

Sympy [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.24 \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=- \frac {\sqrt {2} \sqrt {\frac {\sqrt {b}}{\sqrt {a}}} \log {\left (- \frac {\sqrt {2} \sqrt {a} x \sqrt {\frac {\sqrt {b}}{\sqrt {a}}}}{\sqrt {b}} + \frac {\sqrt {a}}{\sqrt {b}} + x^{2} \right )}}{4} + \frac {\sqrt {2} \sqrt {\frac {\sqrt {b}}{\sqrt {a}}} \log {\left (\frac {\sqrt {2} \sqrt {a} x \sqrt {\frac {\sqrt {b}}{\sqrt {a}}}}{\sqrt {b}} + \frac {\sqrt {a}}{\sqrt {b}} + x^{2} \right )}}{4} \]

[In]

integrate((-b*x**2+a**(1/2)*b**(1/2))/(b*x**4+a),x)

[Out]

-sqrt(2)*sqrt(sqrt(b)/sqrt(a))*log(-sqrt(2)*sqrt(a)*x*sqrt(sqrt(b)/sqrt(a))/sqrt(b) + sqrt(a)/sqrt(b) + x**2)/
4 + sqrt(2)*sqrt(sqrt(b)/sqrt(a))*log(sqrt(2)*sqrt(a)*x*sqrt(sqrt(b)/sqrt(a))/sqrt(b) + sqrt(a)/sqrt(b) + x**2
)/4

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.66 \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=\frac {\sqrt {2} b^{\frac {1}{4}} \log \left (\sqrt {b} x^{2} + \sqrt {2} a^{\frac {1}{4}} b^{\frac {1}{4}} x + \sqrt {a}\right )}{4 \, a^{\frac {1}{4}}} - \frac {\sqrt {2} b^{\frac {1}{4}} \log \left (\sqrt {b} x^{2} - \sqrt {2} a^{\frac {1}{4}} b^{\frac {1}{4}} x + \sqrt {a}\right )}{4 \, a^{\frac {1}{4}}} \]

[In]

integrate((-b*x^2+a^(1/2)*b^(1/2))/(b*x^4+a),x, algorithm="maxima")

[Out]

1/4*sqrt(2)*b^(1/4)*log(sqrt(b)*x^2 + sqrt(2)*a^(1/4)*b^(1/4)*x + sqrt(a))/a^(1/4) - 1/4*sqrt(2)*b^(1/4)*log(s
qrt(b)*x^2 - sqrt(2)*a^(1/4)*b^(1/4)*x + sqrt(a))/a^(1/4)

Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((-b*x^2+a^(1/2)*b^(1/2))/(b*x^4+a),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value

Mupad [B] (verification not implemented)

Time = 13.85 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.41 \[ \int \frac {\sqrt {a} \sqrt {b}-b x^2}{a+b x^4} \, dx=\frac {\sqrt {2}\,b^{1/4}\,\mathrm {atanh}\left (\frac {2\,\sqrt {2}\,a^{1/4}\,b^{11/4}\,x}{2\,\sqrt {a}\,b^{5/2}+2\,b^3\,x^2}\right )}{2\,a^{1/4}} \]

[In]

int(-(b*x^2 - a^(1/2)*b^(1/2))/(a + b*x^4),x)

[Out]

(2^(1/2)*b^(1/4)*atanh((2*2^(1/2)*a^(1/4)*b^(11/4)*x)/(2*a^(1/2)*b^(5/2) + 2*b^3*x^2)))/(2*a^(1/4))